import {createApp} from 'vue'
import './style.css'
import App from './App.vue'

// 导入elementplus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'

// 导入国际化
import zhCn from 'element-plus/es/locale/lang/zh-cn'

// 导入图标模块
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

// 导入路由模块
import router from './router/index.js';

const app = createApp(App);

// 注册路由对象
app.use(router);

// 注册elementplus
app.use(ElementPlus, {
    locale: zhCn,
});

// 循环注册图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

app.mount('#app')
